﻿<UserControl x:Class="WMSSoft.WinKStart.UserControls.ContentRegions"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="280" d:DesignWidth="454">
    <WrapPanel Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Margin="5" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" Visibility="Visible">
        <ListView x:Name="lst_Regions" Height="234" Width="452" VerticalContentAlignment="Center" ItemsSource="{Binding Data}" SelectedItem="{Binding SelectedDataItem}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Caption" DisplayMemberBinding="{Binding Caption}" Width="100"/>
                    <GridViewColumn Header="Name  " DisplayMemberBinding="{Binding Name}" Width="150" />
                    <GridViewColumn Header="DataSource  " DisplayMemberBinding="{Binding DataSource}" Width="200" />
                    <GridViewColumn Header="Filter  " DisplayMemberBinding="{Binding Filter}" Width="200" />
                </GridView>
            </ListView.View>
        </ListView>
        <Button Content="{Binding Cmd_AddClick.ViewName}" Height="23" Width="100" Margin="10,8,0,0" IsEnabled="True" Command="{Binding Cmd_AddClick.Command}" CommandParameter="{Binding ElementName=lst_Regions}"/>
        <Button Content="{Binding Cmd_EditClick.ViewName}" Height="23" Width="100" Margin="10,8,0,0" IsEnabled="{Binding CanWorkWithItems}"  Command="{Binding Cmd_EditClick.Command}" CommandParameter="{Binding ElementName=lst_Regions}"/>
        <Button Content="{Binding Cmd_DeleteClick.ViewName}" Width="100" Height="23" Margin="10,8,0,0" IsEnabled="{Binding CanWorkWithItems}"  Command="{Binding Cmd_DeleteClick.Command}" CommandParameter="{Binding ElementName=lst_Regions}"/>
    </WrapPanel>
</UserControl>
